<#--定义网页标题-->
<#assign title="编辑系统角色权限">
<#--当前模块样式，没有就为空-->
<#assign curModuleStyle="">
<#--公共头部代码-->
<#include "/common/header.ftl">
<!--内容-->
<div class="widget">
    <div class="widget-header">
        <span class="widget-caption"><a id="back" href="#"><i class='glyphicon glyphicon-chevron-left'></i>返回</a></span>
    </div>
    <div class="widget-body">
        <form class="form-horizontal" action="${webRoot}/console/systemRoles/${roleId}/permission" method="post">
            <#list systemPermissionModules as systemPermissionModule>
                <#assign num=systemPermissionModule.permissions.size()>
                <#if (num > 0)>
                    <div class="form-group">
                        <label class="col-sm-2">
                            <div class="col-sm-8 control-label no-padding-right">${systemPermissionModule.name}：</div>
                            <div class="col-sm-4">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" class="colored-blue check-all"/>
                                        <span class="text">全选</span>
                                    </label>
                                </div>
                            </div>
                        </label>
                        <div class="col-sm-6">
                            <div class="row">
                                <#list systemPermissionModule.permissions as systemRolePermission>
                                    <div class="checkbox col-sm-3">
                                        <label>
                                            <input type="checkbox" class="colored-blue" name="permissionId"
                                                   value="${systemRolePermission.id}"
                                                   <#if systemRolePermission.permission>checked</#if>/>
                                            <span class="text">${systemRolePermission.name}</span>
                                        </label>
                                    </div>
                                </#list>
                            </div>
                        </div>
                    </div>
                </#if>
            </#list>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <input type="submit" class="btn btn-palegreen" value="保存"/>
                </div>
            </div>
        </form>
    </div>
</div>
<!-- Common Scripts -->
<#include "/common/scripts.ftl">

<!-- Custom Scripts -->
<script type="text/javascript" src="${webRoot}/resources/console/js/common/combobox.js"></script>
<script type="text/javascript" src="${webRoot}/resources/console/extra/js/jquery.form.js"></script>
<script type="text/javascript" src="${webRoot}/assets/js/toastr/toastr.js"></script>
<script type="text/javascript" src="${webRoot}/resources/console/js/systemRole/edit_systemRolePermission.js"></script>
<#-- 公共底部代码 -->
<#include "/common/footer.ftl">
